"""hulaquan URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from api import views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('info', views.InfoView.as_view()),
    path('drf/info/', views.DrfInfoView.as_view()),
    path('drf/category/', views.DrfCategoryView.as_view()),
    path('drf/category/<pk>', views.DrfCategoryView.as_view()),

    path('new/category/', views.NewCategoryView.as_view()),
    path('new/category/<pk>', views.NewCategoryView.as_view()),

    path('drf/article/', views.ArticleView.as_view()),
    path('drf/article/<pk>', views.ArticleView.as_view()),

    path('new/article/', views.NewArticleView.as_view()),
    path('new/article/<pk>', views.NewArticleView.as_view()),

    path('drf/tag/', views.TagView.as_view()),
    path('drf/tag/<pk>', views.TagView.as_view()),

    # 分页
    path('page/article/', views.PageArticleView.as_view()),
    path('page/view/article/', views.PageViewArticleView.as_view()),

    path('hg/<version>/', include('hg.urls')),

]


urlpatterns += [
    path('cx/', include('cx.urls')),
]

urlpatterns += [
    path('api/<version>/', include('kka.urls')),
]